Skip to content

[Component Audit] Spinner: an empty name falls back to a string label, then "Loading", and each shade and part is tested - #14247

Draft
cixzhang wants to merge 9 commits into
mainfrom
night-watch-component-audit/Spinner/2026-12-03
Draft

cixzhang wants to merge 9 commits into
mainfrom
night-watch-component-audit/Spinner/2026-12-03

Conversation

@cixzhang

@cixzhang cixzhang commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Components: Spinner

User impact

  • Screen-reader users no longer meet a loading indicator with no name. Before, aria-label="", a blank aria-label, label="" or a blank string label named the progressbar with an empty string (WCAG 2.2 4.1.2). Now an empty or blank value counts as unset, so the indicator takes the next name in the record's order: a string label with text, then the translated "Loading" (component:Spinner ORD1, AR1). An aria-label with text, or else a string label with text, names it as before; a string label beside an empty or blank aria-label now names it too.
  • Screen-reader users also hear "Loading" when an unlabelled standalone Spinner with an empty or blank aria-label appears after page load, as for any other standalone Spinner. Before, the empty name made it silent. The record says a standalone Spinner announces and no prop silences it (AR1); a Spinner inside a busy control is hidden with aria-hidden. The changeset says so.
  • Builders get docs that match: the aria-label and label docs and JSDoc say an empty or blank value counts as unset, and a new best practice says to hide a Spinner with aria-hidden inside a control that already reports that it is busy (component:Spinner AR1, spec:AST-086 FR8).
  • The Shades story now renders all four shades. Before, it rendered only default and onMedia, so the shade comparison story showed no subtle or inherit ring.
  • New unit tests (5 empty-name cases, 1 announcement, 4 ownership, 4 shade cases, and one start-rotation assertion) fail if the ref, the spinner target, a caller className or xstyle leave the element the record names in either form; if a labelled Spinner declares the public vars on the inner indicator; if a shade's arc color, track color or track opacity changes; if the track or the rotor loses aria-hidden; or if the arc loses its start rotation. Each fails under a matching mutation of the source.
  • A browser audit spec checks every size, every shade, both label forms and the narrow flex hosts in real Chromium, in light and dark and both directions.
  • The Spinner source comments and the test comments this pull request touches no longer cite pull requests or narrate earlier versions (architecture:knowledge-contracts INV29); and the test comments that described earlier versions now state the constraint only.

Audit result

  • Package/component: core/Spinner (released in @astryxdesign/core under ./Spinner)
  • Mode: Night Watch whole-component audit, rubric 1.16.6
  • Base: 5bc436817b9a
  • Component contract: component:Spinner (authority: current), with architecture:public-component-api, architecture:component-theming-surface, architecture:internationalization, spec:AST-020, spec:AST-086 and spec:AST-017. No backfill: the record maps the whole inventory. No record change (see Needs Review 2).
  • Runtime change: the accessible-name fallback for empty and blank names, and so the announcement fallback for a standalone Spinner with an empty name. No prop, default, style or rendered pixel changes.

Overlap checked: no open pull request changes a file under packages/core/src/Spinner/ or Spinner.stories.tsx.

Before After
Score 82.7 / C (2 BLOCK) 91.2 → C (1 BLOCK; the open BLOCK caps the grade)
Distinct defects 2 BLOCK, 9 FIX, 1 NIT 1 BLOCK, 2 FIX, 0 NIT

§10 is limited: the ring has no reflow, breakpoint, overlay or hit target, so fewer than a third of its checks can fail. Its weight (5) is spread over the other sections in proportion (each weight × 100/95).

Sensitivity: the grade is capped at C by one pre-existing BLOCK (Needs Review 1). Closing it and changing nothing else lifts §1 and §4 to 5: 99.2 / A.

Section W Before After State
§1 Accessibility 16 2.5 3 scored; role="progressbar" with no aria-valuenow, named by ORD1; a string label names it through aria-labelledby and is not repeated; the ring is aria-hidden; the default name is translated; a standalone Spinner announces through the shared channel, a composed one is silent; reduced motion slows the ring (AR4); axe clean in every captured state. BLOCK closed: an empty or blank aria-label or string label left the indicator with an empty name (A1, WCAG 4.1.2). BLOCK open: with a label, a caller aria-labelledby (and other ARIA props) lands on the role-less wrapper, so it names nothing (A1; recorded gap; Needs Review 1)
§2 Theming 14 5 5 scored; one spinner target on the painting element (the indicator, or the wrapper with a label), reflecting size and shade; the five public vars are declared only there (FR6); arc and track from tokens; shade is a closed union and no current record makes it theme-extensible (architecture:component-theming-surface INV14 permits, does not require), so T19 is an authority gap, not a finding
§3 Public API 14 5 5 scored; BaseProps; ref in props; displayName; derived SpinnerSize; JSDoc defaults agree with the docs; passthrough placement is FR1's (cross-reference: the wrapper ARIA gap, scored in §1)
§4 Behavior 12 4.5 4.5 scored; every size draws the documented box; every shade paints its documented arc and track; string and rich labels render below the ring (FR7); a narrow flex host does not compress the box (FR2). Cross-reference, scored in §1: the empty name (closed) and the wrapper ARIA gap (open)
§5a Design, objective 6 5 5 scored; --spacing-2 label gap; motion is a transform on the rotor at --duration-slow-min, linear. Reduced motion slows the ring to 3 s and does not stop it: component:Spinner AR4 decides this, so it is expected, not a D12 finding
§5b Design, rendered 4 3 5 scored from receipted frames, light and dark, both directions: default, every size, the shades, both label forms, the narrow hosts. Before: no frame of subtle or inherit (partial coverage); after: all four shades. The arc's contrast against its backdrop: default 17.2:1 light, 13.4:1 dark; subtle 9.3:1 and 5.7:1; inherit (blue text) 11.3:1 and 8.9:1; onMedia 17.1:1 on its backdrop
§6 Testing 8 3 4.5 scored; FIX closed (5): the verification map's gaps for ref, target, className and xstyle placement in both forms (FR1, FR8), the labelled form's var declarations (FR6), the default arc and track colors and track opacities (FR5), the hidden ring (AR2) and the start rotation (FR3); plus empty-name tests. FIX open: the themed arc fraction and the server render (PR1) have no automated check
§7 Code health 8 4.5 5 scored; no Effect of its own; the rotor syncs through a callback ref; geometry registration at module scope; composes useAnnounceRenderedText and useThemeIndicator. NIT closed: comments that narrated history and cited pull requests (C21; INV29)
§8 Docs 8 4 5 scored; usage, 3 do's and 2 don'ts, a hero block and 3 examples. FIX closed: the Shades story rendered no subtle or inherit ring (X10); FIX closed: no guidance on hiding a composed Spinner (X16; AR1)
§9 i18n and RTL 5 5 5 scored; the default name is @astryx.spinner.loading; logical styles; RTL verified N/A on file (the ring turns the same way in every locale); the label stacks under the ring in both directions
§10 Responsive and touch 5 4.5 4.5 limited; the NarrowFlexHost story and receipts; FIX open: no long-label receipt (R11)

§11 is not run for a released component.

Why the score moved: the §1 empty-name fix, the §6 tests, the §8 story and guidance, the §5b shade frames and the §7 comments.

Pre-fix score: scored from base source and a browser run of the audit spec against a Storybook built from the base 5bc4368 (the spec uncommitted beside it). Night Watch records only the landed post-fix result in the score ledger, so the pre-fix score lives here.

Findings fixed

ID Finding Authority Fix and proof
A1 (BLOCK) An empty or blank aria-label or string label named the indicator with an empty string component:Spinner ORD1, AR1 (non-empty name sources, then the translated default); WCAG 2.2 4.1.2 Empty and blank values count as unset. Five new name tests and a new announcement test (an unlabelled Spinner with an empty aria-label announces "Loading") fail on the base source and pass at the head
V3 (FIX ×5) The verification map lists ref, target, className and xstyle placement, the labelled form's var declarations, the default colors and opacities, the hidden ring and the start rotation as untested component:Spinner verification map; rubric V3, V5 Eight new test cases and one new assertion; mutations (vars declared on the inner span, className on the inner span, the track not hidden, the inherit opacity changed, no start rotation) each fail at least one
X10 (FIX) The Shades story rendered no subtle or inherit ring component:Spinner FR5 Shades renders all four; the browser spec checks each one's arc color, track color and track opacity
X16 (FIX) No guidance on hiding a composed Spinner component:Spinner AR1; spec:AST-086 FR8 A best practice in the English, Chinese and dense docs
C21 (NIT) Comments narrated history and cited pull requests architecture:knowledge-contracts INV29 Rewritten to state the constraint only; the comment-provenance lint baseline drops the removed citation

A changeset records the fix.

Needs Review

  1. Caller ARIA beside a label (BLOCK, §1). The record names this gap: with a label, a caller aria-labelledby (and every other passthrough) lands on the role-less wrapper, so it names nothing. Which name wins when a caller aria-labelledby and a visible string label are both present is not settled by ORD1, so it is left for that decision.
  2. Record follow-up. The record's Current-state impact and AR1 still list the empty-name gap this pull request closes, and its verification map still lists the newly tested parts as gaps. That edit needs the spec owner.
  3. Empty visible label. label="" still renders an empty Text under the ring. No current record decides whether an empty label renders; it is recorded here, not scored.

Evidence

  • Audit spec: SpinnerAudit.a11y.chromium.spec.ts drives the Default, Sizes, Shades, WithLabel and NarrowFlexHost stories in the Neutral theme under reduced motion. Every receipt binds the Storybook build SHA and checkout, story, theme, mode, direction, viewport, DPR 2, reduced-motion and forced-colors media, settled fonts, a finished story render and no page errors. Checks that fail the receipt when they do not hold, each in light and dark and both directions:
    • default: one progressbar carrying the target, named "Loading", with no aria-valuenow, a 20 px box, a hidden ring, the accent arc at 3:1 or more; axe clean;
    • sizes: sm to xl draw 14, 20, 24 and 36 px boxes;
    • shades: each of the four shades paints its arc and track colors and track opacity;
    • label: the string label names the indicator through aria-labelledby and sits below the ring; the rich label keeps its aria-label;
    • narrow: each ring in a narrow flex host keeps its full box.
  • Before: against a Storybook built from 5bc4368 (the spec uncommitted beside it), default, sizes, label and narrow pass (16 receipts); the 4 shades receipts fail with "no subtle spinner" and "no inherit spinner" because the story renders neither. The before frames were not kept, so this pull request reports the before run's results, not a frame-by-frame comparison.
  • After: against a Storybook built from ec5aa82, all 20 receipts (20 frames) pass, including the 4 shades receipts with all four rings. The head 260d903 changes only comments, docs, the changeset and the lint baseline after that commit, so no rendered output changes; exact-head pr-a11y runs the audit spec again. Receipts are written to test-results/spinner-audit-evidence/.
  • Visual acceptance: no shipped style changes. The Shades story adds two rings.
  • Unit tests: at ec5aa82, the Spinner suites pass (80 tests); after it, the head changes only comments, docs, the changeset and the lint baseline. At the first commit, the Spinner suites with themingTargets.test.ts, docPropReferences.test.ts, docPropLiterals.test.ts and extensibleAxes.test.ts passed (609 tests), and so did the Core typecheck (with the docs typecheck), the Storybook typecheck and pnpm check:changesets; strict lint on the changed files reported one switch-exhaustiveness error in the audit spec, fixed by a lookup. Exact-head CI runs the rest.

Closed evidence inventory

Surface Source Tests Consumer docs Rendered evidence Authority Result
Indicator, role, name role, aria-label, aria-labelledby naming, empty-name (new) aria-label, label (fixed) default, label frames ORD1, AR1 pass; wrapper ARIA gap (BLOCK open)
ref, target, DOM props indicator or wrapper ownership (new), data-testid — default, label frames FR1 pass
Styling props mergeProps className, xstyle (new), style box xstyle — FR2, FR8 pass
Size SIZES, size vars box sizing size sizes frames FR2, FR6 pass
Shade shade vars, track opacity paint (new) shade shades frames FR5, FR6 pass
Ring track, rotor, arc ring suite, hidden ring (new), start rotation (new) — every frame FR3, AR2 pass
Motion rotor keyframes ring suite; SpinnerMotion.a11y.chromium.spec.ts — motion spec FR3, FR4, AR4 pass
Theme variables public vars theme routing, labelled declarations (new) theming.vars themed stories FR6, AV1 pass
Theme indicator useThemeIndicator themeIndicatorSeams.test.tsx — — FR9 pass
Announcement useAnnounceRenderedText announcement suite — — AR1, AST-086 pass
Label Text or node label tests label label frames FR7 pass; empty visible label recorded
Flex host flexShrink: 0 — — narrow frames FR2 pass
FR10 eligibility report
{
  "schema": "astryx.audit-eligibility/v1",
  "component": "Spinner",
  "package": "core",
  "mode": "night-watch",
  "rubricVersion": "1.16.6",
  "repository": {"base": "5bc436817b9a", "head": "260d90354991462660652c1ab67ba8d4bcb4be3c"},
  "contract": {"id": "component:Spinner", "authority": "current", "changed": false},
  "inventory": {"closed": true, "rows": 12},
  "remediations": [
    {"id": "empty-name-fallback", "kind": "bug-fix", "evidence": "5 name tests and 1 announcement test red at base, green at head"},
    {"id": "verification-map-tests", "kind": "objective-test", "evidence": "8 test cases and 1 assertion; 5 mutations each fail at least one"},
    {"id": "shades-story", "kind": "objective-test", "evidence": "story; shades receipts"},
    {"id": "composed-guidance", "kind": "doc-drift", "evidence": "doc diff; record AR1"},
    {"id": "source-comments", "kind": "doc-drift", "evidence": "comment diff; INV29"}
  ],
  "unresolved": {"objective": ["themed arc fraction test", "server render test", "long-label receipt"], "manual": ["caller ARIA beside a label (record gap)", "record follow-up", "empty visible label"]},
  "approvals": {"specOwner": "not required (no record change)"},
  "verdict": {"autoMergeEligible": false, "reasons": ["AST-029 FR11 activation has not shipped", "one open BLOCK", "a runtime fix"]}
}

@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Building Building Preview Dec 3, 2026 4:55pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 3, 2026
@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Dec 3, 2026
@astracat-bot

astracat-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Dec 3, 2026, 4:55 PM UTC

@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The empty-name fix follows the Spinner record's name order, and its six new empty-name tests fail on the base source and pass on this branch (reproduced locally); the blocking items are a stale lint baseline and wording that misdescribes the fix.

Blocking

  • The comment-provenance baseline is out of date: CI's lint job fails because internal/eslint-plugin-astryx/no-comment-provenance.baseline.json still lists the #5410 citation this change removed from Spinner.tsx, so run node internal/eslint-plugin-astryx/no-comment-provenance.baseline.mjs and commit the result.
  • Title and changeset overstate the "Loading" fallback: with a string label beside an empty aria-label, the Spinner is named and announced by that label, so write "an empty or blank name falls back to the label, then "Loading"" in the title and "an unlabelled standalone Spinner with an empty or blank aria-label now announces "Loading"" in the changeset.
  • The label docs do not say a blank label is ignored: the English, Chinese and dense label entries, the dense aria-label entry and the label JSDoc say any "non-empty" string label names the indicator, but label=" " does not, so reuse the aria-label entry's "an empty or blank value counts as unset" there and in the description's and changeset's "non-empty" wording.
  • Comments still narrate history: Spinner.tsx:188-192 still justifies the inline box size by "a precedence over the box that it has never had", so state only the constraint (a rule would let a caller's style={{width}} override the box); Spinner.test.tsx:194-200 and :367-369 read the same way.

Non-blocking

  • Flex-shrink comment reads backwards: Spinner.tsx:197-199 makes the host's min-width: 0 sound like the reason the box keeps its size; say that flex-shrink: 0 does.
  • Eligibility report names the previous commit: refresh it from this commit, where six empty-name tests fail on the base source, not five.
Claims and files checked

Review mode: full; reason: no-earlier-review

  • Title, an empty name falls back to "Loading": false; with a string label the name is the label (blocking item 2).
  • Title, each shade and part is tested: verified by the shade-paint, ownership and ring tests, run here.
  • Changeset, an empty or blank aria-label or string label no longer leaves no name: verified; the new tests fail on the base source and pass here.
  • Changeset, the fallback is a string label, then "Loading": verified in code; its "non-empty" wording misses blank labels (blocking item 3).
  • Changeset, an empty aria-label now announces "Loading": false for a labelled Spinner, which announces its label (blocking item 2).
  • Changeset and docs, aria-hidden silences a composed Spinner: verified by code and an existing test.
  • Description, empty and blank values used to give an empty name: verified on the base source.
  • Description, docs match the behavior: false for blank values (blocking item 3); the new best practice is in all three doc sets: verified.
  • Description, the Shades story shows all four shades: verified with frames captured here.
  • Description, the new unit tests fail if each named part moves or changes: verified by reading each assertion; the mutation runs are reported.
  • Description, the browser audit spec covers every size, shade, label form and narrow host in light, dark and both directions: verified by reading; not run at this head.
  • Description, comments no longer narrate history or cite pull requests: no pull request numbers remain; one source comment still narrates history (blocking item 4).
  • Description, only the name fallback changes at runtime, with no prop, default, style or pixel change: verified; the API surface is unchanged and unchanged stories render pixel-identical.
  • Description, no record change: verified.
  • Description, unit test counts, Core typecheck and changeset check: verified here (79 Spinner tests; 609 across the listed suites), and so is the Storybook typecheck; lint of the changed files shows no errors here, and the strict-lint result is reported; CI's lint job fails at this head on the comment-provenance baseline (blocking item 1).
  • Description, scores, sensitivity, open-PR overlap, contrast figures, mutation counts and the pending browser run: reported.
  • Files: .changeset/spinner-audit.md (blocking item 2); apps/storybook/stories/Spinner.stories.tsx (clear); packages/core/src/Spinner/Spinner.doc.mjs (blocking item 3); packages/core/src/Spinner/Spinner.test.tsx (clear; two comments noted under blocking item 4); packages/core/src/Spinner/Spinner.tsx (blocking items 1, 3 and 4; one non-blocking note); packages/core/src/Spinner/__tests__/SpinnerAudit.a11y.chromium.spec.ts (clear, not run).

Automated review (maintainer link)

Comment thread .changeset/spinner-audit.md Resolved
Comment thread packages/core/src/Spinner/Spinner.tsx Resolved
@cixzhang
cixzhang marked this pull request as draft December 3, 2026 14:42
@cixzhang cixzhang changed the title [Component Audit] Spinner: an empty name falls back to "Loading", and each shade and part is tested [Component Audit] Spinner: an empty name falls back to the label, then "Loading", and each shade and part is tested Dec 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The empty-name fix follows the Spinner record's name order, and earlier blockers (the lint baseline, the label docs and the history comments) are fixed; three wording claims still misdescribe the change.

Blocking

  • The changeset says a Spinner whose name was empty now announces its name: one with label text still announces that text, so aria-label="" beside a rich label is now named "Loading" but announces the label's own text, and a string label was announced before this change too (reproduced locally in Chromium and the unit environment); write "A standalone Spinner that shows no label text and had an empty or blank name now announces "Loading"; one with label text still announces that text."
  • The title says an empty name falls back to any label: a rich-node label never names the indicator, so aria-label="" beside one gives "Loading"; write "an empty name falls back to a string label, then "Loading"", as the changeset and docs already do.
  • The description still says any non-empty value names it as before: "A non-empty aria-label or string label names it as before" is false for blank values, which name nothing, and for a string label beside an empty aria-label, which did not name the indicator before and does now; write "An aria-label with text, or else a string label with text, names it as before; a string label beside an empty or blank aria-label now names it too."
Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0)
  • Title, an empty name falls back to the label, then "Loading": false for a rich label (blocking item 2).
  • Title, each shade and part is tested: verified; the shade-paint, ownership and ring tests pass, run locally.
  • Changeset, an empty or blank aria-label or string label no longer leaves the indicator unnamed: verified in Chromium's accessibility tree, base and head, and by the new name tests, which fail on the base source.
  • Changeset, an empty or blank value counts as unset, then a string label with text, then "Loading": verified.
  • Changeset, a Spinner whose name was empty now announces its name: false for a Spinner with label text (blocking item 1).
  • Changeset and docs, aria-hidden silences a Spinner inside a busy control: verified by the code and an existing test.
  • Description, empty and blank values used to give an empty name: verified on the base source in Chromium.
  • Description, a non-empty aria-label or string label names it as before: false (blocking item 3).
  • Description, an unlabelled Spinner with an empty or blank aria-label now announces "Loading" where it was silent: verified in Chromium's live region (the blank case sent only whitespace).
  • Description, the docs and the label JSDoc say empty or blank counts as unset, and the new best practice is in all three doc sets: verified.
  • Description, the Shades story shows all four shades: verified with frames captured locally.
  • Description, the new unit tests, their counts and what each would catch: verified by reading and running; the mutation results are reported.
  • Description, the browser audit spec covers every size, shade, label form and narrow host in light, dark and both directions: verified by reading; not run.
  • Description, touched comments no longer cite pull requests or narrate earlier versions, and the lint baseline drops the removed citation: verified; the baseline check passes locally.
  • Description, only the name and announcement fallback change at runtime, with no prop, default, style or API change: verified; the API report shows no change.
  • Description, no record change, with the caller-ARIA gap, the record follow-up and the empty visible label left open: verified.
  • Description, scores, contrast figures, before and after receipt counts, earlier-commit test, typecheck and lint runs, and open pull request overlap: reported.
  • Files: .changeset/spinner-audit.md (blocking item 1); apps/storybook/stories/Spinner.stories.tsx (clear); internal/eslint-plugin-astryx/no-comment-provenance.baseline.json (clear); packages/core/src/Spinner/Spinner.doc.mjs (clear); packages/core/src/Spinner/Spinner.test.tsx (clear); packages/core/src/Spinner/Spinner.tsx (clear); packages/core/src/Spinner/__tests__/SpinnerAudit.a11y.chromium.spec.ts (clear, not run).

Automated review (maintainer link)

Comment thread .changeset/spinner-audit.md Resolved
@cixzhang cixzhang changed the title [Component Audit] Spinner: an empty name falls back to the label, then "Loading", and each shade and part is tested [Component Audit] Spinner: an empty name falls back to a string label, then "Loading", and each shade and part is tested Dec 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The empty-name fix follows the Spinner record's name order, and its new tests, docs and Shades story are correct (the six new name tests fail on the base source and pass here, and a Chromium accessibility-tree check agrees); three claims in the release note and description are not true at this head.

  • The changeset's announcement sentence drops the after-page-load bound: a Spinner present while the page loads stays silent, as do ones with a caller role other than progressbar, aria-hidden, or an enclosing live region, so please write "… now announces "Loading" when it appears after page load, as any other standalone Spinner does; one with label text still announces that text."
  • Miss: The description says no story showed subtle or inherit, but the base's ThemedColor and PullToRefresh stories render subtle and the Indicator BusyChildren and BusyToggle stories render inherit, so the User impact bullet, the docs score row and the X10 row should say only that the Shades story lacked them.
  • The description says the head changes only comments and docs after the commit its unit-test run used, but it also edits the changeset and the comment-provenance baseline, so please use the wording the After bullet already has.
  • Miss: Non-blocking: two rewritten comments in Spinner.tsx run long under INV29 (lines 188-191 and 214-219); the inline comment suggests shorter wording.
Claims and files checked

Review mode: incremental; reason: none

  • Title: an empty name falls back to a string label, then "Loading" — verified (name tests; accessibility tree, run here)
  • Title: each shade and part is tested — verified (shade-paint, ownership, hidden-ring, start-rotation and label tests)
  • Changeset: an empty or blank aria-label or string label no longer leaves the indicator unnamed — verified
  • Changeset: the fallback order — verified
  • Changeset: a standalone Spinner with no label text and an empty name now announces "Loading" — false (page load and the other silent cases)
  • Changeset: aria-hidden silences a Spinner inside a busy control — verified
  • Description: the four empty cases had empty names before — verified (accessibility tree on the base, run here)
  • Description: the new order, and a string label naming it beside an empty aria-label — verified
  • Description: an unlabelled standalone Spinner with an empty aria-label announces "Loading" when it appears — verified
  • Description: docs and JSDoc describe blank values; the new aria-hidden best practice — verified
  • Description: the Shades story now shows all four shades — verified; no story showed subtle or inherit before — false
  • Description: the new test inventory and what each test pins — verified; mutation results — reported
  • Description: the browser audit spec's coverage — verified by reading; not yet run in CI (draft)
  • Description: comments no longer cite pull requests or narrate history, and the baseline drops the citation — verified (baseline check, run here)
  • Description: no prop, default, style or rendered pixel change — verified (API generator: no changes, run here)
  • Description: no overlapping open pull request — reported
  • Description: audit scores and before/after receipts — reported
  • Description: after the receipt run the head changes only comments, docs, the changeset and the lint baseline — verified; only comments and docs after the unit-test run — false
  • Description: the three needs-review items match the record and the code — verified
  • .changeset/spinner-audit.md — finding
  • apps/storybook/stories/Spinner.stories.tsx — clear
  • internal/eslint-plugin-astryx/no-comment-provenance.baseline.json — clear
  • packages/core/src/Spinner/Spinner.doc.mjs — clear
  • packages/core/src/Spinner/Spinner.test.tsx — clear
  • packages/core/src/Spinner/Spinner.tsx — clear (non-blocking comment note)
  • packages/core/src/Spinner/__tests__/SpinnerAudit.a11y.chromium.spec.ts — clear

Automated review (maintainer link)

Comment thread .changeset/spinner-audit.md Resolved
Comment thread packages/core/src/Spinner/Spinner.tsx Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The empty-name fix follows the Spinner record's name order, and the release note's announcement sentence is now bounded to after page load. The name logic, tests, docs and Shades story are correct: the six new name tests fail on the base source and pass here, and Chromium's accessibility tree agrees, both run locally. Two claims in the description are still not true at this head.

  • The description says no story showed subtle or inherit, but the base's ThemedColor and PullToRefresh stories render subtle and the Indicator BusyChildren and BusyToggle stories render inherit, so the User impact bullet, the docs score row and the X10 row should say only that the Shades story lacked them.
  • The description says the head changes only comments and docs after the commit its unit-test run used, but it also edits the changeset and the comment-provenance baseline, so please use the wording the After bullet already has.
  • Non-blocking: the svg comment in Spinner.tsx still has a 29-word sentence under INV29 (lines 213-216); the inline comment suggests two shorter sentences.
  • Non-blocking: the description's After bullet and eligibility report still name the previous commit as the head; this head only adds another commit of the same kind.
Claims and files checked

Review mode: incremental; reason: none

  • Title: an empty name falls back to a string label, then "Loading" — verified (accessibility tree and name tests, run locally)
  • Title: each shade and part is tested — verified (shade-paint, ownership, hidden-ring, start-rotation and label tests)
  • Changeset: an empty or blank aria-label or string label no longer leaves the indicator unnamed — verified
  • Changeset: the fallback order — verified
  • Changeset: a standalone Spinner with no label text and an empty name announces "Loading" when it appears after page load, as any other does; one with label text still announces that text — verified (mount-after-load probe and announcement tests, run locally)
  • Changeset: aria-hidden silences a Spinner inside a busy control — verified
  • Description: the four empty or blank cases had empty names before — verified (accessibility tree on the base, run locally)
  • Description: the new order, and a string label naming it beside an empty or blank aria-label — verified
  • Description: an unlabelled standalone Spinner with an empty or blank aria-label announces "Loading" when it appears, as any other does, and was silent before — verified
  • Description: docs and JSDoc describe blank values; the new aria-hidden best practice in all three doc sets — verified
  • Description: the Shades story now shows all four shades — verified; no story showed subtle or inherit before — false
  • Description: the new test inventory and what each test pins — verified; mutation results — reported
  • Description: the browser audit spec's coverage — verified by reading; CI routes it to audit pull requests but has not run on this draft
  • Description: comments no longer cite pull requests or narrate history, and the baseline drops the citation — verified (baseline check, run locally)
  • Description: no prop, default, style or rendered pixel change — verified (API generator: no changes, run locally)
  • Description: three do's, two don'ts, a hero block and three examples — verified
  • Description: no overlapping open pull request — reported
  • Description: audit scores, contrast figures and before/after receipts — reported
  • Description: after the receipt run only comments, docs, the changeset and the lint baseline changed — verified (the named head is one commit behind); only comments and docs after the unit-test run — false
  • Description: the three needs-review items match the record and the code — verified
  • .changeset/spinner-audit.md — clear
  • apps/storybook/stories/Spinner.stories.tsx — clear
  • internal/eslint-plugin-astryx/no-comment-provenance.baseline.json — clear
  • packages/core/src/Spinner/Spinner.doc.mjs — clear
  • packages/core/src/Spinner/Spinner.test.tsx — clear
  • packages/core/src/Spinner/Spinner.tsx — clear (non-blocking comment note)
  • packages/core/src/Spinner/__tests__/SpinnerAudit.a11y.chromium.spec.ts — clear
  • changed rules (0): none

Automated review (maintainer link)

Comment thread packages/core/src/Spinner/Spinner.tsx Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI. CI has not run on this head yet. The empty-name fallback follows the Spinner record's name order, and the description's story-coverage and tested-commit claims are now bounded correctly.

  • Miss: Non-blocking: two comments this pull request rewrites in Spinner.tsx break INV29's sentence length (lines 88-91 and 193-194); see the inline suggestions.
Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim: an empty name falls back to a string label, then "Loading" - verified (browser accessibility tree on base and head, run here; Spinner.tsx:430-442)
  • Claim: each shade and part is tested - verified (shade-paint, ownership, ring and naming tests pass, run here)
  • Claim: before, an empty or blank aria-label or string label gave an empty name - verified (browser accessibility tree on the base, run here)
  • Claim: the next name source in the record's order now applies, and a string label beside an empty or blank aria-label names it - verified (accessibility tree and probe tests, run here)
  • Claim: an unlabelled standalone Spinner with an empty or blank aria-label announces "Loading" after page load, silent before - verified (live region on base and head, run here)
  • Claim: docs and JSDoc say an empty or blank value counts as unset, plus an aria-hidden best practice - verified (Spinner.doc.mjs:38, :44, :105-109 and the Chinese and dense sets; Spinner.tsx:370-373)
  • Claim: the Shades story renders all four shades, where it rendered only default and onMedia - verified (base and head frames, run here)
  • Claim: the new unit tests (5 name, 1 announcement, 4 ownership, 4 shade, 1 start-rotation assertion) catch the listed changes - verified for the counts and assertions (Spinner.test.tsx:834-837, :845-960); the mutation runs are reported
  • Claim: the browser audit spec checks every size, shade, label form and narrow host in light, dark and both directions - verified by reading the spec; its receipts are reported (not run here or in CI at this head)
  • Claim: the Spinner source and the touched test comments no longer cite pull requests or narrate earlier versions - verified (search of the Spinner folder; baseline check passes, run here)
  • Claim: the runtime change is only the name and announcement fallback, with no prop, default, style or rendered pixel change - verified (API generator 0 rows, run here; source diff)
  • Claim: after the commit its tests ran on, the head changes only comments, docs, the changeset and the lint baseline - verified (diff from that commit to the head)
  • Claim: the Spinner suites pass (80 tests) - verified (79 and 1 pass at the head, run here)
  • Claim: no open pull request touches the Spinner folder or its stories - reported (five open pull requests that mention Spinner spot-checked)
  • Claim: audit scores, before and after receipts, mutation results, typechecks and the first commit's wider run - reported
  • Claim: the changeset's fallback, announcement and aria-hidden sentences - verified (accessibility tree and live region, run here); patch classification - verified (check:changesets, run here)
  • Claim: the open items (caller ARIA beside a label, record follow-up, empty visible label) - verified as stated against the record
  • File: .changeset/spinner-audit.md - clear
  • File: apps/storybook/stories/Spinner.stories.tsx - clear
  • File: internal/eslint-plugin-astryx/no-comment-provenance.baseline.json - clear
  • File: packages/core/src/Spinner/Spinner.doc.mjs - clear
  • File: packages/core/src/Spinner/Spinner.test.tsx - clear
  • File: packages/core/src/Spinner/Spinner.tsx - non-blocking comment note
  • File: packages/core/src/Spinner/__tests__/SpinnerAudit.a11y.chromium.spec.ts - clear

Automated review (maintainer link)

Comment thread packages/core/src/Spinner/Spinner.tsx Outdated
* it through an inline `width`/`height` with the size's own default as the
* `var()` fallback, so a render with no stylesheet — where nothing declares
* it — still sizes the box the way it always did. A registered property always
* it — still sizes the box at the size's default. A registered property always

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): the sentence that ends here runs to 37 words. Suggest: "The element reads it through an inline width/height, with the size's own default as the var() fallback. So a render with no stylesheet still sizes the box at that default."

Comment thread packages/core/src/Spinner/Spinner.tsx Outdated
// it to the automatic minimum size, which a host takes away again the
// moment it sets `min-width: 0` on its items. A spinner that does not fit
// overflows its host visibly instead of being silently sliced.
// A flex host must not compress the box: the ring draws at its own size,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): this sentence runs to 26 words and joins an instruction to its reason. Suggest: "The ring draws at its own size, so a compressed box cuts it off at its edge. A flex host must not compress the box."

This branch was successfully deployed

1 active (outdated) deployment
Preview — e4af89d4 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant